-- 字典类型信息
--set @dictId=65000;
insert into sys_dict_type (dict_id,dict_name,dict_type,status,create_by,create_time,update_by,update_time,remark,view_sql,sql_mode_on) values
     (65000 + 100, '数据源类型', 'data_datasource_type', 'Y', 'init', '2024-01-02 03:04:05', 'init', '2024-01-02 03:04:05', '值集编码参考com.alibaba.datax.plugin.rdbms.util.DataBaseType类', '', 'N')
    ,(65000 + 101, '数据源分组', 'data_datasource_group', 'Y', 'init', '2024-01-02 03:04:05', 'init', '2024-01-02 03:04:05', '', '', 'N')
    ,(65000 + 102, '读数据源', 'datasource_read', 'Y', 'init', '2024-01-02 03:04:05', 'init', '2024-01-02 03:04:05', '', 'SELECT DATASOURCE_ID DICT_VALUE ,DATASOURCE_NAME DICT_LABEL FROM data_datasource_info WHERE IS_ENABLE=''Y'' AND (DB_PRIVILEGES =''RO'' OR DB_PRIVILEGES =''RW'')', 'Y')
    ,(65000 + 103, '写数据源', 'datasource_write', 'Y', 'init', '2024-01-02 03:04:05', 'init', '2024-01-02 03:04:05', '', 'SELECT DATASOURCE_ID DICT_VALUE ,DATASOURCE_NAME DICT_LABEL FROM data_datasource_info WHERE IS_ENABLE=''Y'' AND (DB_PRIVILEGES =''WO'' OR DB_PRIVILEGES =''RW'')', 'Y')
;

-- 字典值集数据
--set @dictCode=65000;
insert into sys_dict_data (dict_code,dict_sort,dict_label,dict_value,dict_type,css_class,list_class,is_default,status,create_by,create_time,update_by,update_time,remark,extcol1,extcol2,extcol3,extcol4,extcol5,extcol6,extcol7,extcol8) values
     (65000 + 101,1,'MySQL','mysql','data_datasource_type','','','Y','Y','init','2024-01-02 03:04:05','init','2024-01-02 03:04:05','','com.mysql.jdbc.Driver','','','','','','','')
    ,(65000 + 102,2,'Oracle','oracle','data_datasource_type','','','N','Y','init','2024-01-02 03:04:05','init','2024-01-02 03:04:05','','oracle.jdbc.OracleDriver','','','','','','','')
    ,(65000 + 103,3,'PostgreSQL','postgresql','data_datasource_type','','','N','Y','init','2024-01-02 03:04:05','init','2024-01-02 03:04:05','','org.postgresql.Driver','','','','','','','')
    ,(65000 + 104,1,'默认','default','data_datasource_group','','','Y','Y','init','2024-01-02 03:04:05','init','2024-01-02 03:04:05','','','','','','','','','')
;

-- 数据源类型扩展字段
insert into "sys_dict_extcol" ("id","table_name", "extcol_name", "extcol_label", "extcol_alias", "status") values
    (seq_sys_dict_extcol.nextval,'sys_dict_data_data_datasource_type','extcol1','JDBC驱动类','jdbcDriverClass','Y')
;

-- 菜单信息表(数据集成平台：650~699)
insert into sys_menu (menu_id,menu_name,parent_id,order_num,path,component,is_frame,url,menu_type,visible,status,always_show,perms,icon,create_by,create_time,update_by,update_time,remark) values
(650,'数据集成平台',0,650,'Data','','N','#','M','Y','Y','Y','','redis','init','2024-01-02 03:04:05','init','2024-01-02 03:04:05','数据集成平台')
,(651,'数据源管理',650,10,'DataDataSource','@data/datasource/index','N','/data/datasource','C','Y','Y','Y','data:datasource:view','menu','init','2024-01-02 03:04:05','init','2024-01-02 03:04:05','')
,(652,'数据集管理',650,20,'DataDataSet','@data/dataset/index','N','/data/dataset','C','Y','Y','Y','data:dataset:view','menu','init','2024-01-02 03:04:05','init','2024-01-02 03:04:05','')
,(653,'服务器管理',650,5,'DataServer','@data/dataserver/index','N','/data/dataserver','C','Y','Y','Y','data:dataserver:view','menu','init','2024-01-02 03:04:05','init','2024-01-02 03:04:05','')
,(654,'采集任务构建',650,40,'DataCollection','@data/datacollection/index','N','/data/datacollection','C','Y','Y','Y','data:datacollection:view','edit','init','2024-01-02 03:04:05','init','2024-01-02 03:04:05','')
,(655,'JSON任务管理',650,50,'DataJobJson','@data/job/json/index','N','/data/job/json','C','Y','Y','Y','data:job:json:view','edit','init','2024-01-02 03:04:05','init','2024-01-02 03:04:05','')
;

-- 菜单按钮
--set @menuFuncId=65000;
insert into sys_menu (menu_id,menu_name,parent_id,order_num,path,component,is_frame,url,menu_type,visible,status,perms,icon,create_by,create_time,update_by,update_time,remark) values
     (65000 + 0,'查询',651,1,'','','N','#','F','Y','Y','data:datasource:search','#','init','2024-01-02 03:04:05','init','2024-01-02 03:04:05','')
    ,(65000 + 1,'新增',651,2,'','','N','#','F','Y','Y','data:datasource:insert','#','init','2024-01-02 03:04:05','init','2024-01-02 03:04:05','')
    ,(65000 + 2,'修改',651,3,'','','N','#','F','Y','Y','data:datasource:update','#','init','2024-01-02 03:04:05','init','2024-01-02 03:04:05','')
    ,(65000 + 3,'删除',651,4,'','','N','#','F','Y','Y','data:datasource:delete','#','init','2024-01-02 03:04:05','init','2024-01-02 03:04:05','')
    ,(65000 + 10,'查询',652,1,'','','N','#','F','Y','Y','data:dataset:search','#','init','2024-01-02 03:04:05','init','2024-01-02 03:04:05','')
    ,(65000 + 11,'新增',652,2,'','','N','#','F','Y','Y','data:dataset:insert','#','init','2024-01-02 03:04:05','init','2024-01-02 03:04:05','')
    ,(65000 + 12,'修改',652,3,'','','N','#','F','Y','Y','data:dataset:update','#','init','2024-01-02 03:04:05','init','2024-01-02 03:04:05','')
    ,(65000 + 13,'删除',652,4,'','','N','#','F','Y','Y','data:dataset:delete','#','init','2024-01-02 03:04:05','init','2024-01-02 03:04:05','')
    ,(65000 + 30,'查询',653,1,'','','N','#','F','Y','Y','data:dataserver:search','#','init','2024-01-02 03:04:05','init','2024-01-02 03:04:05','')
    ,(65000 + 31,'新增',653,2,'','','N','#','F','Y','Y','data:dataserver:insert','#','init','2024-01-02 03:04:05','init','2024-01-02 03:04:05','')
    ,(65000 + 32,'修改',653,3,'','','N','#','F','Y','Y','data:dataserver:update','#','init','2024-01-02 03:04:05','init','2024-01-02 03:04:05','')
    ,(65000 + 33,'删除',653,4,'','','N','#','F','Y','Y','data:dataserver:delete','#','init','2024-01-02 03:04:05','init','2024-01-02 03:04:05','')
    ,(65000 + 40,'查询',654,1,'','','N','#','F','Y','Y','data:datacollection:search','#','init','2024-01-02 03:04:05','init','2024-01-02 03:04:05','')
    ,(65000 + 41,'新增',654,2,'','','N','#','F','Y','Y','data:datacollection:insert','#','init','2024-01-02 03:04:05','init','2024-01-02 03:04:05','')
    ,(65000 + 42,'修改',654,3,'','','N','#','F','Y','Y','data:datacollection:update','#','init','2024-01-02 03:04:05','init','2024-01-02 03:04:05','')
    ,(65000 + 43,'删除',654,4,'','','N','#','F','Y','Y','data:datacollection:delete','#','init','2024-01-02 03:04:05','init','2024-01-02 03:04:05','')
    ,(65000 + 50,'查询',655,1,'','','N','#','F','Y','Y','data:datacollection:search','#','init','2024-01-02 03:04:05','init','2024-01-02 03:04:05','')
    ,(65000 + 51,'新增',655,2,'','','N','#','F','Y','Y','data:datacollection:insert','#','init','2024-01-02 03:04:05','init','2024-01-02 03:04:05','')
    ,(65000 + 52,'修改',655,3,'','','N','#','F','Y','Y','data:datacollection:update','#','init','2024-01-02 03:04:05','init','2024-01-02 03:04:05','')
    ,(65000 + 53,'删除',655,4,'','','N','#','F','Y','Y','data:datacollection:delete','#','init','2024-01-02 03:04:05','init','2024-01-02 03:04:05','')
;
